package com.hongawen.designmode.创建型.工厂方法模式.设计后;

import com.hongawen.designmode.创建型.工厂方法模式.设计后.factory.GifReaderFactory;
import com.hongawen.designmode.创建型.工厂方法模式.设计后.factory.IReaderFactory;
import com.hongawen.designmode.创建型.工厂方法模式.设计后.factory.JPGReaderFactory;
import com.hongawen.designmode.创建型.工厂方法模式.设计后.product.IPicReader;

/**
 * @author hongawen
 */
public class Client {

    public static void main(String[] args) {
        IReaderFactory readerFactory = new JPGReaderFactory();
        IPicReader reader = readerFactory.createReader();
        reader.read("测试地址");
        readerFactory = new GifReaderFactory();
        reader = readerFactory.createReader();
        reader.read("测试地址");
    }
}
